<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>注册用户</title>
<script src="${pageContext.request.contextPath}/static/bootstrap3/js/jquery-1.11.2.min.js"></script>
<style>
body{
	background: #ebebeb;
	font-family: "Helvetica Neue","Hiragino Sans GB","Microsoft YaHei","\9ED1\4F53",Arial,sans-serif;
	color: #222;
	font-size: 14px;
}
.ipt{
	border: 1px solid #d3d3d3;
	padding: 5px 5px;
	width: 180px;
	border-radius: 4px;
	padding-left: 18px;
	-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
	box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
	-webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
	-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
	transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s
}
</style>
<script type="text/javascript">
function checkForm(){
	var uname=$("#uname").val();
	var passwd=$("#passwd").val();
	var passwd1=$("#passwd1").val();
    var tel=$("#tel").val();
    var email=$("#email").val();
	if(uname==null||uname==""){
		$("#error").html("用户名不能为空！");
		return false;
	}
	if(passwd==null||passwd==""){
		$("#error").html("密码不能为空！");
		return false;
	}
	if(passwd1==null||passwd1==""){
		$("#error").html("重复输入密码不能为空！");
		return false;
	}
	if(passwd!==passwd1){
		$("#error").html("前后输入密码不一致！");
		return false;
	}
	if(tel==null||tel==""){
		$("#error").html("移动电话不能为空！");
		return false;
	}
	if(email==null||email==""){
		$("#error").html("邮箱不能为空！");
		return false;
	}
	return true;
}
</script>
</head>

<body>
	<div align="center">
		<div id="top">
			<jsp:include page="head.jsp"/>
		</div>
		<p>
		<br>
		<br>
		<form action="user/register" method="post" onsubmit="return checkForm()">
			<div align="center">
			<span>*</span>表示必须填写
			<span><font color="red" id="error">${status }</font></span>
			<p>
				&nbsp;用 户 名   ：
				<span>*</span>
			<input type="text" name="uname" id="uname" class="ipt" maxlength="20">
			</p>
			<p>
				登陆密码：
				<span>*</span>
			<input id="passwd" type="password" name="passwd" class="ipt" maxlength="30">
			</p>
			<p>
				确认密码：
				<span>*</span>
			<input id="passwd1" type="password" name="passwd1" class="ipt" maxlength="30">
			</p>
			<p>
				移动电话：
				<span>*</span>
			<input id="tel" type="text" name="tel" class="ipt" maxlength="20">
			</p>
			<p>
				电子邮箱：
				<span>*</span>
			<input type="text" name="email" id="email" class="ipt" maxlength="30">
			</p>
			<p>
				&nbsp; 年 &nbsp;  龄 &nbsp;：
				<span>*</span>
			<input type="text" id="age" class="ipt" name="age">
			</p>
			<p>
				&nbsp; 爱 &nbsp;  好 &nbsp;：
				<span>*</span>
			<input type="text" id="hobby" class="ipt" name="hobby">
			</p>
			<br>
			<input class="submit" type="submit" value="注  册">
			</div>
		</form>
		<div id="foot">
			<jsp:include page="foot.jsp"/> 
		</div>
	</div>
</body>
</html>
